import React from "react";
import { Tag } from "antd";

interface RemindTagProps {
  remind: boolean;
  text?: string;
  onClick?: () => void;
}

const RemindTag: React.FC<RemindTagProps> = ({
  remind,
  text = "",
  onClick,
}) => {
  //  仓库物品闽值标识
  return (
    <Tag color={remind ? "red" : "green"} onClick={() => onClick && onClick()}>
      {text}
      {remind ? "待补仓" : "充足"}
    </Tag>
  );
};

export default RemindTag;
